-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 11 clang-tidy checks #293
Conversation
It looks good to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
9349186
to
50415a7
Compare
@@ -151,7 +151,7 @@ int Grid3D::Check_Custom_Boundary(int *flags, struct parameters P) | |||
} | |||
|
|||
for (int i = 0; i < 6; i++) { | |||
if (!((flags[i] >= 0) && (flags[i] <= 5))) { | |||
if (flags[i] < 1 or flags[i] > 5) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if these "or" and "not" statements are portable for other compilers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They've been part of the C++ standard since C++98 so any standard compliant compiler will support them; see section 2.5 of the C++98 Standard.
MSVC is historically non-compliant with whatever standards they decide they don't like and so some versions from the mid 2010's and earlier don't support these alternative tokens directly but they can be enabled by either setting the right compiler flags or including the C compliance header.
Fixed and enable modernize-use-auto and its aliad hicpp-use-auto. Removed unsafe alias to a DeviceVector pointer in io.cpp
Also, it's alias cert-dcl59-cpp
This check provides minimal benefit to us and flags every single gtest TEST macro as failing so I've disabled it.
Clang-Tidy Checks
Fixed and enabled the following
clang-tidy
ChecksDisabled cert-err58-cpp. It provides minimal benifit to us and flags every single gtest
TEST
macro as failing.Other